package my.avoskagae.store.gaejdo.entity;

import java.io.Serializable;
import java.util.List;

import javax.jdo.annotations.Element;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class UserDataStoreImpl implements Serializable {

	private static final long serialVersionUID = 2L;

	@PrimaryKey
	@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true" )
	private String key;
	
	@Persistent
	String userId;

	@Persistent(mappedBy = "userDataStore", defaultFetchGroup="true")
	@Element(dependent="true")
	List<ProductImpl> products;
	
	public String getKey() {
		return key;
	}

	public List<ProductImpl> getProducts() {
		return products;
	}

	public void setProducts(List<ProductImpl> products) {
		this.products = products;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	
}
